]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overview: Don't expect time argument from drag-end signal
authorJonas Dreßler <verdre@v0yd.nl>
Wed, 23 Feb 2022 15:23:02 +0000 (16:23 +0100)
committerMarge Bot <marge-bot@gnome.org>
Wed, 23 Feb 2022 17:58:36 +0000 (17:58 +0000)
We actually don't get a time from the xdndHandler when it emits
drag-end, so we fail right now when calling
workspaceManager.get_workspace_by_index(time).

Fix it by getting the time ourselves instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2211>

js/ui/overview.js

index 7fd38848bf6c203bf4e97f16889dfe92264b74db..73bef029456fc601472f30df15dba16ce5365319 100644 (file)
@@ -260,7 +260,7 @@ var Overview = class {
         this._lastActiveWorkspaceIndex = workspaceManager.get_active_workspace_index();
     }
 
-    _onDragEnd(time) {
+    _onDragEnd() {
         this._inXdndDrag = false;
 
         // In case the drag was canceled while in the overview
@@ -268,7 +268,8 @@ var Overview = class {
         // the overview
         if (this._shown) {
             let workspaceManager = global.workspace_manager;
-            workspaceManager.get_workspace_by_index(this._lastActiveWorkspaceIndex).activate(time);
+            workspaceManager.get_workspace_by_index(this._lastActiveWorkspaceIndex)
+                .activate(global.get_current_time());
             this.hide();
         }
         this._resetWindowSwitchTimeout();